home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 1 / Meeting Pearls Vol 1 (1994).iso / installed_progs / text / faqs / linux.howto.mail < prev    next >
Encoding:
Internet Message Format  |  1994-04-26  |  16.5 KB

  1. Subject: Linux Electronic Mail HOWTO
  2. Newsgroups: comp.os.linux.announce,comp.os.linux.admin,comp.answers,news.answers
  3. From: vince@victrola.wa.com (Vince Skahan)
  4. Date: Mon, 25 Apr 1994 19:47:54 GMT
  5.  
  6. Archive-name: linux/howto/mail
  7. Last-modified: 19 Apr 94
  8.  
  9.   The Linux Electronic Mail HOWTO
  10.   Vince Skahan, <vince@victrola.wa.com>
  11.   v1.5, Last modified 26 March 1994
  12.  
  13.   This  document describes the setup and care+feeding of Electronic Mail
  14.   (e-mail) under Linux. You need to read this if you plan to communicate
  15.   locally  or to remote sites via electronic mail. You probably do *not*
  16.   need to read this document if  don't  exchange  electronic  mail  with
  17.   other users on your system or with other sites.
  18.  
  19.   1.  Introduction
  20.  
  21.   The  intent  of  this  document is to answer some of the questions and
  22.   comments that appear to  meet  the  definition  of  'frequently  asked
  23.   questions' about e-mail software under Linux.
  24.  
  25.   This  document  and  the corresponding UUCP and News 'HOWTO' documents
  26.   collectively supersede the UUCP-NEWS-MAIL-FAQ that has previously been
  27.   posted to comp.os.linux.announce.
  28.  
  29.  
  30.   1.1.  New versions of this document
  31.  
  32.   New   versions  of  this  document  will  be  periodically  posted  to
  33.   comp.os.linux.announce, comp.answers,  and  news.answers.   They  will
  34.   also  be  added  to  the  various anonymous ftp sites who archive such
  35.   information including sunsite.unc.edu:/pub/Linux/docs/HOWTO.
  36.  
  37.  
  38.   1.2.  Feedback
  39.  
  40.   I am interested in any feedback, positive or negative,  regarding  the
  41.   content  of  this  document  via e-mail.  Definitely contact me if you
  42.   find errors or obvious omissions.
  43.  
  44.   I read, but do not necessarily  respond  to,  all  e-mail  I  receive.
  45.   Requests  for  enhancements will be considered and acted upon based on
  46.   that day's combination of available time, merit of  the  request,  and
  47.   daily blood pressure :-)
  48.  
  49.   Flames will quietly go to /dev/null so don't bother.
  50.  
  51.   Feedback concerning the actual format of the document should go to the
  52.   HOWTO coordinator - Matt Welsh (mdw@sunsite.unc.edu).
  53.  
  54.  
  55.   1.3.  Copyright Information
  56.  
  57.   The Mail-HOWTO is copyrighted (c)1994 Vince Skahan.
  58.  
  59.   A verbatim copy  may  be  reproduced  or  distributed  in  any  medium
  60.   physical or electronic without permission of the author.  Translations
  61.   are similarly permitted without express permission if  it  includes  a
  62.   notice on who translated it.
  63.  
  64.   Short  quotes  may  be  used  without  prior  consent  by  the author.
  65.   Derivative work and partial distributions of the  Mail-HOWTO  must  be
  66.   accompanied  with  either a verbatim copy of this file or a pointer to
  67.   the verbatim copy.
  68.  
  69.   Commercial redistribution is  allowed  and  encouraged;  however,  the
  70.   author would like to be notified of any such distributions.
  71.  
  72.   In short, we wish to promote dissemination of this information through
  73.   as many channels as possible. However, we do wish to retain  copyright
  74.   on  the HOWTO documents, and would like to be notified of any plans to
  75.   redistribute the HOWTOs.
  76.  
  77.   We further want  that  ALL  information  provided  in  the  HOWTOS  is
  78.   disseminated.   If  you have questions, please contact Matt Welsh, the
  79.   Linux HOWTO coordinator, at mdw@sunsite.unc.edu, or +1 607 256 7372.
  80.  
  81.  
  82.   1.4.  Standard Disclaimer
  83.  
  84.   Of course, I disavow any potential liability for the contents of  this
  85.   document.  Use of the concepts, examples, and/or other content of this
  86.   document is entirely at your own risk.
  87.  
  88.  
  89.   1.5.  Other sources of information
  90.  
  91.  
  92.   1.5.1.  LINUX HOWTO Documents:
  93.  
  94.   There is plenty of exceptional material provided in  the  other  Linux
  95.   HOWTO  documents  and  from the Linux DOC project.  In particular, you
  96.   might want to take a look at the following:
  97.  
  98.   o  the serial communications HOWTO
  99.  
  100.   o  the ethernet HOWTO
  101.  
  102.   o  the Linux Networking Guide
  103.  
  104.   1.5.2.  USENET:
  105.  
  106.  
  107.              comp.mail.elm           the ELM mail system.
  108.              comp.mail.mh            The Rand Message Handling system.
  109.              comp.mail.mime          Multipurpose Internet Mail Extensions.
  110.              comp.mail.misc          General discussions about computer mail.
  111.              comp.mail.multi-media   Multimedia Mail.
  112.              comp.mail.mush          The Mail User's Shell (MUSH).
  113.              comp.mail.sendmail      the BSD sendmail agent.
  114.              comp.mail.uucp          Mail in the uucp environment.
  115.  
  116.  
  117.  
  118.   1.5.3.  Mailing Lists:
  119.  
  120.   There is a smail-3.1 mailing list.  To join (or  get  off)  the  list,
  121.   send mail to
  122.  
  123.           smail3-users-request@cs.athabascau.ca
  124.  
  125.  
  126.  
  127.   Make  sure  that  you include the address at which you want to receive
  128.   mail in the text of the message.  To send a message to the list,  send
  129.   it to
  130.  
  131.           smail3-users@cs.athabascau.ca.
  132.  
  133.  
  134.  
  135.   1.5.4.  Books
  136.  
  137.   The following is a non-inclusive set of books that will help...
  138.  
  139.   o  "Managing  UUCP  and  USENET" from O'Reilly and Associates is in my
  140.      opinion the best book out there for figuring out the  programs  and
  141.      protocols involved in being a USENET site.
  142.  
  143.   o  "Unix   Communications"  from  The  Waite  Group  contains  a  nice
  144.      description of all the pieces (and more) and how they fit together.
  145.  
  146.   o  "Sendmail"   from   O'Reilly  and  Associates  looks  to  like  the
  147.      definitive reference on sendmail-v8 and sendmail+IDA.  It's a "must
  148.      have"  for  anybody  hoping  to  make sense out of sendmail without
  149.      bleeding in the process.
  150.  
  151.   o  "The Internet Complete Reference" from Osborne is a fine  reference
  152.      book  that  explains the various services available on Internet and
  153.      is a great "one-stop-shopping"  source  for  information  on  news,
  154.      mail, and various other Internet resources.
  155.  
  156.   1.6.  Where *NOT* to look for help
  157.  
  158.   There  is  nothing  "special" about configuring and running mail under
  159.   Linux (any more).  Accordingly, you almost certainly do *NOT* want  to
  160.   be  posting  generic  mail-related  questions  to  the comp.os.linux.*
  161.   newsgroups.
  162.  
  163.   Unless your posting is truly Linux-specific (ie, "please tell me  what
  164.   routers are already compiled into the SLS1.03 version of smail3.1.28")
  165.   you should be asking your  questions  in  one  of  the  newsgroups  or
  166.   mailing lists referenced above.
  167.  
  168.   Let me repeat that.
  169.  
  170.   There  is  virtually  no  reason  to post anything mail-related in the
  171.   comp.os.linux hierarchy any more.  There are  existing  newsgroups  in
  172.   the comp.mail.* hierarchy to handle *ALL* your questions.
  173.  
  174.   IF  YOU  POST TO COMP.OS.LINUX.* FOR NON-LINUX-SPECIFIC QUESTIONS, YOU
  175.   ARE LOOKING IN THE WRONG PLACE FOR HELP.  THE ELECTRONIC MAIL  EXPERTS
  176.   HANG OUT IN THE PLACES INDICATED ABOVE AND GENERALLY DO NOT RUN LINUX.
  177.  
  178.   POSTING TO THE LINUX HIERARCHY FOR NON-LINUX-SPECIFIC QUESTIONS WASTES
  179.   YOUR  TIME  AND  EVERYBODY  ELSE'S...AND IT FREQUENTLY DELAYS YOU FROM
  180.   GETTING THE ANSWER TO YOUR QUESTION.
  181.  
  182.  
  183.   2.  Hardware Requirements
  184.  
  185.  
  186.   There are no specific hardware requirements for mail under Linux.
  187.  
  188.   You'll need some sort of 'transport' software  to  connect  to  remote
  189.   systems, which means either tcp-ip or uucp.   This could mean that you
  190.   need a modem or ethernet card (depending on your setup).
  191.  
  192.  
  193.   3.  Getting the software
  194.  
  195.   In general, I grab my sources  from  ftp.uu.net  and  the  other  fine
  196.   archive  sites  on Internet.  In addition, Linux-specific binary ports
  197.   are found in the usual Linux  distrbutions  and  on  the  usual  Linux
  198.   anonymous   ftp   sites   (sunsite.unc.edu   and   tsx-11.mit.edu   in
  199.   particular).
  200.  
  201.   The newspak-2.1.tar.z distribution contains config  files  and  readme
  202.   files  related  to  building uucp, news, and mail software under Linux
  203.   from the various freely-available sources.  It can usually be found on
  204.   sunsite.unc.edu in the directory /pub/Linux/system/Mail.
  205.  
  206.  
  207.   4.  Mail 'Transport Agents'
  208.  
  209.   This section contains information related to 'transport agents', which
  210.   means the underlying software  that  connects  your  local  system  to
  211.   remote systems.
  212.  
  213.  
  214.   4.1.  Smail v3.1
  215.  
  216.   Smail3.1 seems to be a de-facto standard transport agent for uucp-only
  217.   sites and for some smtp sites.  It compiles without patching from  the
  218.   sources.   In  addition,  smail  is provided in binary form in the SLS
  219.   distribution of Linux.
  220.  
  221.   The newspak distribution contains config files for  smail3.1.28  under
  222.   Linux that you can use to start with.
  223.  
  224.   If   you're   building   smail   from   sources,   you  need  to  have
  225.   CASE_NO_NEWLINES=true in your os/linux file so that  'sed'  gives  you
  226.   shell scripts that work properly.
  227.  
  228.   For  a  uucp-only  system  that  has  a  MX-record  and  that  wants a
  229.   domainized header (who goes  through  a  smart-host  for  everything),
  230.   these are the entire config files you'll need:
  231.  
  232.  
  233.   o  replace 'subdomain.domain' with your domain name
  234.  
  235.   o  replace 'myhostname' with you un-domainized hostname
  236.  
  237.   o  replace 'my_uucp_neighbor' with the uucp name of your upstream site
  238.  
  239.  
  240.              #-------- /usr/local/lib/smail/config -----------------
  241.              #
  242.              # domains we belong to
  243.              visible_domain=subdomain.domain:uucp
  244.              #
  245.              # who we're known as (fully-qualified-site-name)
  246.              visible_name=myhostname.subdomain.domain
  247.              #
  248.              # who we go through
  249.              smart_path=my_uucp_neighbor
  250.              #
  251.              #---------- /usr/local/lib/smail/paths --------------
  252.              #
  253.              # we're a domainized site, make sure we accept mail to both names
  254.              myhostname        %s
  255.              myhostname.subdomain.domain      %s
  256.              #
  257.              #-------------------------------------------------------------------
  258.  
  259.  
  260.   To run smail as a smtp daemon, add the following  to  /etc/inetd.conf:
  261.   smtp stream tcp nowait  root  /usr/bin/smtpd smtpd
  262.  
  263.   Outgoing  mail  gets  sent  automatically,  when  using  elm.  If your
  264.   internet link is down when you  send  mail,  then  the  mail  sits  in
  265.   "/usr/spool/smail/input".   When the link next comes up, "runq" is run
  266.   which causes the mail to be sent.
  267.  
  268.  
  269.   4.2.  Sendmail+IDA
  270.  
  271.   I run  a  uucp-only  site  and  use  sendmail5.65b+IDA1.5  instead  of
  272.   smail3.1.28  due  to  the  incredible  ease of use.  There is a binary
  273.   distribution on sunsite.unc.edu in pub/Linux/system/Mail
  274.  
  275.   To install it...
  276.  
  277.  
  278.   o  you'll probably want to remove (or rename) all the files from smail
  279.      (see the /install/installed directory if you are SLS) to be safe.
  280.  
  281.   o  cd  to  /  then "gunzip -c sendmail5.65b+IDA1.5.tpz | tar xvf -" If
  282.      you have a "modern" tar from a recent Slackware (for  example)  you
  283.      can  probably  just  do a "tar -zxvf filename.tgz" and get the same
  284.      results.
  285.  
  286.   o  cd to /usr/local/lib/mail/CF and copy the sample.m4  local.m4  file
  287.      to  "yourhostname.m4".  Edit out the distributed hostname, aliases,
  288.      and smarthost and put in  the  correct  one  for  your  site.   The
  289.      default file is for a uucp-only site who has domainized headers and
  290.      who talks to a smart host.  Then "make  yourhostname.cf"  and  move
  291.      the resulting file to /etc/sendmail.cf
  292.  
  293.   o  if you are uucp-only, you do *NOT* need to create any of the tables
  294.      mentioned in the README.linux file.  You'll just have to touch  the
  295.      files  so  that  the  Makefile works.  Just edit the .m4 file, make
  296.      sendmail.cf, and start testing it.
  297.  
  298.   o  if you're uucp-only and you talk  to  sites  in  addition  to  your
  299.      "smart-host",  you'll  need  to add uucpxtable entries for each (or
  300.      mail to them will also go through  the  smart  host)  and  run  dbm
  301.      against the revised uucpxtable.
  302.  
  303.   o  if  you use my sendmail5.67b+IDA1.5 distribution you should not use
  304.      a "freeze file".
  305.  
  306.   o  If you run Rich Braun's  original  binary  distribution  of  5.67a,
  307.      you'll need to freeze the configuration if you change your .cf file
  308.      with "/usr/lib/sendmail -bz" to make the changes take effect.   You
  309.      should  also update your version to at least 5.67b since there is a
  310.      nasty security hole in 5.67a and earlier.
  311.  
  312.   Another nice thing is that if you have  mail.debug  set  and  you  run
  313.   syslogd,  your  incoming  and  outgoing mail messages will get logged.
  314.   See the /etc/syslog.conf file for details.
  315.  
  316.   The sources for sendmail+IDA may be found at  uxc.cso.uiuc.edu.   They
  317.   require no patching to run under Linux.
  318.  
  319.   If  you're  going  to run sendmail+IDA, I strongly recommend you go to
  320.   the sendmail5.67b+IDA1.5 version  since  all  required  Linux-specific
  321.   patches are now in the vanilla sources and several security holes have
  322.   been plugged that WERE (!!!) in the older version you may have grabbed
  323.   or built before about December 1st, 1993.
  324.  
  325.  
  326.   4.3.  Sendmail 8.6
  327.  
  328.   Sendmail  8.6.x  from  Berkeley  is  the  latest  major revision after
  329.   sendmail5.  It has  wonderful  built-in  support  for  building  under
  330.   Linux.  Just "make linux" and you'll be all set.
  331.  
  332.  
  333.   4.4.  Other "transport agents"
  334.  
  335.   The following also are known to run under Linux.  Consult "archie" for
  336.   details regarding how to find them...
  337.  
  338.  
  339.   o  smail2.5 - very simple UUCP-based smail
  340.  
  341.   4.5.  Local Delivery Agents
  342.  
  343.   Unlike most operating systems, Linux does not  have  mail  "built-in".
  344.   You'll need a program to deliver the local mail.
  345.  
  346.   One good program is Rich Braun's "lmail" program, but I've switched to
  347.   using the more commonly available "deliver" program.
  348.  
  349.   Documentation for how to use either  for  local  delivery  is  in  the
  350.   sendmail5.67b+IDA1.5 binary release (on sunsite) mentioned above.
  351.  
  352.  
  353.   5.  Mail "User Agents"
  354.  
  355.  
  356.   This  section  contains  information  related  to "user agents", which
  357.   means the software the user sees and uses.  This  software  relies  on
  358.   the "transport agents" mentioned above.
  359.  
  360.  
  361.   5.1.  Elm
  362.  
  363.   Elm  compiles,  installs,  and  runs flawlessly under Linux.  For more
  364.   information, see the elm sources and installation instructions.
  365.  
  366.   The only thing to know is that Elm's Configure script incorrectly sets
  367.   the  "ranlib"  variable  in  config.sh.   When Configure gives you the
  368.   chance to edit config.sh before  proceeding,  please  do  so  and  set
  369.   "ranlib='ranlib'"  or the binaries will compile but not link.  The Elm
  370.   Development Team has been informed of this little problem,  so  please
  371.   don't bother them with it (again).
  372.  
  373.   Elm  and filter need to be mode 2755 (group mail) with /usr/spool/mail
  374.   mode 775 and group mail.
  375.  
  376.   If  you  use  a  binary  distribution,  you'll  need   to   create   a
  377.   /usr/local/lib/elm/elm.rc  file  to  override the compiled-in hostname
  378.   and domain information:
  379.  
  380.  
  381.   o  replace "subdomain.domain" with your domain name replace
  382.  
  383.   o  "myhostname" with you un-domainized hostname replace
  384.  
  385.   o  "my_uucp_neighbor" with the uucp name of your upstream site
  386.  
  387.  
  388.              #---------- /usr/local/lib/elm/elm.rc ------------------
  389.              #
  390.              # this is the unqualified hostname
  391.              hostname = myhostname
  392.              #
  393.              # this is the local domain
  394.              hostdomain = subdomain.domain
  395.              #
  396.              # this is the fully qualified hostname
  397.              hostfullname = myhostname.subdomain.domain
  398.              #
  399.              #--------------------------------------------------------
  400.  
  401.  
  402.   One thing you want to be aware of is that if you have Elm compiled  to
  403.   be MIME-able, you need metamail installed and in your path or Elm will
  404.   not be able to read MIME mail you've received.  Metamail is  available
  405.   on thumper.bellcore.com and of course via "archie".
  406.  
  407.  
  408.   5.2.  Mailx
  409.  
  410.   There  is a fine binary implementation of mailx located on the various
  411.   Linux archive sites.  Make sure you grab version 5.3b or  later  since
  412.   there are security problems in v5.3a.
  413.  
  414.   The  only  potential  problem  I'm  aware  of  is  that it seems to be
  415.   compiled  in  a  way  that   requires   /usr/lib/smail   rather   than
  416.   /usr/lib/sendmail  as  a transport agent.  You probably need a link if
  417.   you run sendmail on your system.
  418.  
  419.   I strongly recommend removing the old "edmail" stuff from SLS1.00  and
  420.   replacing it with mailx.
  421.  
  422.  
  423.   5.3.  Other user agents
  424.  
  425.   The following also are known to run under Linux.  Consult "archie" for
  426.   details regarding how to find them...
  427.  
  428.   o  Pine      - from the Univ. of Washington
  429.  
  430.   o  Metamail  - allows MIME support
  431.  
  432.   o  mh        - yet another way to handle mail
  433.  
  434.   o  deliver   - file/process mail based on rules
  435.  
  436.   o  procmail  - file/process mail based on rules
  437.  
  438.   o  Majordomo - manages e-mail lists
  439.  
  440.   o  Mserv     - provide files-by-mail
  441.  
  442.   6.  Acknowledgements
  443.  
  444.   The following people have helped in the assembly  of  the  information
  445.   (and experience) that helped make this document possible:
  446.  
  447.   Steve Robbins, Ian Kluft, Rich Braun, Ian Jackson, Syd Weinstein, Ralf
  448.   Sauther, Martin White, Matt Welsh, Ralph Sims, Phil Hughes
  449.  
  450.   If I forgot anybody, my apologies...
  451.  
  452.